﻿<%@ Page Title="Manage Report" Language="C#" MasterPageFile="~/MasterPage.master"
    AutoEventWireup="true" CodeFile="Mng_Report.aspx.cs" Inherits="admin_Mng_Report" %>

<asp:Content ID="Head" ContentPlaceHolderID="head" runat="Server">
    <link href="../styles/admin.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
     <div id="top_menu">
        <div id="help_button">
            help
        </div>
                                <div id="logout">
            <asp:LoginStatus ID="LoginStatus1" runat="server" LogoutPageUrl="../Default.aspx"
                OnLoggingOut="LoginStatus1_LoggingOut" />
        </div>
    </div>
    <div id="page_title">
        ADMINISTRATION
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    <div id="left_content">
        <div class="menu">
            <ul>
                <li><a href="Home.aspx">Home</a></li>
                <li><a href="Mng_Client.aspx">Manage Clients</a></li>
                <li><a href="Mng_Site.aspx">Manage Sites</a></li>
                <li><a href="Mng_Machine.aspx">Manage Machines</a></li>
                <li><a href="Mng_Comp.aspx">Manage Components</a></li>
                <li><a href="#" class="current">Manage Reports</a></li>
                <li><a href="Mng_WO.aspx">Manage Work Order</a></li>
                <li><a href=Mng_FaultsRecom.aspx>Manage Faults Recommendation</a></li>
     
            </ul>
        </div>
    </div>
    <!-- end of left content -->
    <div id="right_content">
        <div class="content_area">
            <h2>
                Manage Report
            </h2>
            <div class="form_box">
                <asp:GridView ID="GridViewReport" runat="server" AllowPaging="True" AllowSorting="True"
                    AutoGenerateColumns="False" DataKeyNames="component_id,dateRecorded" DataSourceID="ReportsOnComponentsObjectDataSource"
                    OnSelectedIndexChanged="GridViewReport_SelectedIndexChanged">
                    <Columns>
                        <asp:TemplateField HeaderText="component_id" ShowHeader="False" SortExpression="component_id"
                            Visible="False">
                            <EditItemTemplate>
                                <asp:Label ID="component_idLabel1" runat="server" Text='<%# Eval("component_id") %>'></asp:Label>
                            </EditItemTemplate>
                            <%--    <ItemTemplate>
                                <asp:Label ID="component_idLabel" runat="server" Text='<%# Bind("component_id") %>'></asp:Label>
                            </ItemTemplate>--%>
                        </asp:TemplateField>
                        <asp:BoundField DataField="dateRecorded" HeaderText="Date Recorded" ReadOnly="True"
                            SortExpression="dateRecorded" DataFormatString="{0:d}">
                            <ItemStyle CssClass="column" />
                        </asp:BoundField>
                        <asp:BoundField DataField="componentName" HeaderText="Component" SortExpression="componentName">
                            <ItemStyle CssClass="column" />
                        </asp:BoundField>
                        <asp:BoundField DataField="statusName" HeaderText="Conditions" SortExpression="statusName">
                            <ItemStyle CssClass="column" />
                        </asp:BoundField>
                        <asp:CommandField SelectText="Details..." ShowSelectButton="True">
                            <ItemStyle CssClass="column" />
                        </asp:CommandField>
                    </Columns>
                    <HeaderStyle CssClass="header" />
                </asp:GridView>
                <asp:ObjectDataSource ID="ReportsOnComponentsObjectDataSource" runat="server" OldValuesParameterFormatString="original_{0}"
                    SelectMethod="GetData" TypeName="DataAccess.i2iPortalTableAdapters.ComponentStatusOnComponentsTableAdapter">
                </asp:ObjectDataSource>
                <br />
                <asp:Button ID="CreateReportButton" runat="server" Text="Create New VA Report" OnClick="CreateReportButton_Click"
                    CssClass="buttons" />
                <br />
                <asp:Button runat="server" OnClick="OilButtonClicked" Text="Create New Oil Report"
                    CssClass="buttons" />
                <br />
                <asp:Button ID="ModifyVA_btn" runat="server" Text="Modify VA Report" OnClick="ModifyVAButton_Click"
                    CssClass="buttons" />
                <br />
                <asp:Button ID="btnArchiveReports" runat="server" Text="Archive Oil Reports" OnClick="btnArchiveReports_Click"
                    CssClass="buttons" />
            </div>
        </div>
    </div>
    <!-- end of right content -->
</asp:Content>
